import {ref} from 'vue'
import type {Marks} from '@/model/overclock'

export const DEFAULT_USER = {
	VISITOR_USERNAME: 'visitor',
	VISITOR_PASSWORD: '111111',
	DEFAULT_INTRODUCTION: '这个人很懒，什么也没留下。'
}

/**
 * 缓存时长
 */
export const CACHE_DURATION = {
	/**
	 * 用户名片缓存时长（ms）
	 */
	USER_CARD: 1000 * 60 * 10,
	/**
	 * 物品信息缓存时长（ms）
	 */
	ITEM: 1000 * 60 * 60,
	/**
	 * 建筑信息缓存时长（ms）
	 */
	BUILDING: 1000 * 60 * 60,
	/**
	 * 生产建筑信息缓存时长（ms）
	 */
	PRODUCTION_BUILDING: 1000 * 60 * 60
}

/**
 * 运力
 */
export const TRANSPORT_CAPACITY = {
	/**
	 * 各级传送带运力（个/min）
	 */
	belt: [60, 120, 270, 480, 780, 1200],
	/**
	 * 各级管道运力（m³/min）
	 */
	pipeline: [300, 600]
}

export const MAX_INTEGER = 2147483647

export const IMAGE_URL = {
	logoLargeUrl: 'https://assets.my-satisfactory.cn/images/logo_large.png',
	logoSmallUrl: 'https://assets.my-satisfactory.cn/images/logo_small.png',
	headerUrl: 'https://assets.my-satisfactory.cn/images/login_header.jpg',
	defaultAvatar: 'https://assets.my-satisfactory.cn/images/default_avatar.png',
	moviePoster: 'https://assets.my-satisfactory.cn/images/movie-poster.jpg',
	balancer_2to2: 'https://assets.my-satisfactory.cn/images/balancer/2-2.png',
	balancer_2to3: 'https://assets.my-satisfactory.cn/images/balancer/2-3.png',
	balancer_2to4: 'https://assets.my-satisfactory.cn/images/balancer/2-4.png',
	balancer_2to5: 'https://assets.my-satisfactory.cn/images/balancer/2-5.png',
	balancer_2to6: 'https://assets.my-satisfactory.cn/images/balancer/2-6.png',
	balancer_3to2: 'https://assets.my-satisfactory.cn/images/balancer/3-2.png',
	balancer_3to3: 'https://assets.my-satisfactory.cn/images/balancer/3-3.png',
	balancer_3to4: 'https://assets.my-satisfactory.cn/images/balancer/3-4.png',
	balancer_3to5: 'https://assets.my-satisfactory.cn/images/balancer/3-5.png'
}

export const DASHBOARD_PICTURE_URL = ref([
	'https://assets.my-satisfactory.cn/images/steam_pictures/1.jpg',
	'https://assets.my-satisfactory.cn/images/steam_pictures/2.jpg',
	'https://assets.my-satisfactory.cn/images/steam_pictures/3.jpg',
	'https://assets.my-satisfactory.cn/images/steam_pictures/4.jpg',
	'https://assets.my-satisfactory.cn/images/steam_pictures/5.jpg',
	'https://assets.my-satisfactory.cn/images/steam_pictures/6.jpg',
	'https://assets.my-satisfactory.cn/images/steam_pictures/7.jpg',
	'https://assets.my-satisfactory.cn/images/steam_pictures/8.jpg',
	'https://assets.my-satisfactory.cn/images/steam_pictures/9.jpg',
	'https://assets.my-satisfactory.cn/images/steam_pictures/10.jpg'
])

/**
 * 超频倍率标签
 */
export const OVERCLOCK_PERCENTAGE_MARKS: Marks = {
	0.01: {
		style: {
			color: '#409EFF',
		},
		label: '1%',
	},
	1: {
		style: {
			color: '#FFFFFF',
		},
		label: '100%',
	},
	2.5: {
		style: {
			color: '#F55656',
		},
		label: '250%',
	}
}

/**
 * 能量碎片id
 */
export const POWER_SHARD_ID = 21
